<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #F8F9FA;
}
-->
</style>
<link href="<%=basePath %>admin/images/skin.css" rel="stylesheet" type="text/css" />
<body>
    <%
     if(session.getAttribute("msg")!=null)
     {
       %>
        <script type="text/javascript">
         alert('<%=session.getAttribute("msg")%>');  
        </script>
       <%
       session.removeAttribute("msg");
     }
     %>

		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="17" height="29" valign="top"
					background="<%=basePath %>admin/images/mail_leftbg.gif">
					<img src="<%=basePath %>admin/images/left-top-right.gif" width="17" height="29" />
				</td>
				<td width="935" height="29" valign="top"
					background="<%=basePath %>admin/images/content-bg.gif">
					<table width="100%" height="31" border="0" cellpadding="0"
						cellspacing="0" class="left_topbg" id="table2">
						<tr>
							<td height="31">
								<div class="titlebt">
									留言管理
								</div>
							</td>
						</tr>
					</table>
				</td>
				<td width="16" valign="top"
					background="<%=basePath %>admin/images/mail_rightbg.gif">
					<img src="<%=basePath %>admin/images/nav-right-bg.gif" width="16" height="29" />
				</td>
			</tr>
			<tr>
				<td height="71" valign="middle"
					background="<%=basePath %>admin/images/mail_leftbg.gif">&nbsp;
					
				</td>
				<td valign="top" bgcolor="#F7F8F9">
					<table width="100%" height="138" border="0" cellpadding="0"
						cellspacing="0">
						
						<tr>
							<td valign="top">
								<table width="98%" border="0" align="center" cellpadding="0"
									cellspacing="0">
									<tr>
										<td class="left_txt">
											当前位置：留言信息管理
										</td>
									</tr>
									<tr>
										<td height="20">
											<table width="100%" height="1" border="0" cellpadding="0"
												cellspacing="0" bgcolor="#CCCCCC">
												<tr>
													<td></td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" height="55" border="0" cellpadding="0"
												cellspacing="0">
												<tr>
													<td width="10%" height="55" valign="middle">
														<img src="<%=basePath %>admin/images/add2--4.png" width="54" height="55">
													</td>
													<td width="90%" valign="top">
														<span class="left_txt2">在这里，您可以根据您的网站要求，修改设置网站的</span><span
															class="left_txt3">会员信息录入</span><span class="left_txt2">！</span>
														<br>
														<span class="left_txt2">包括</span><span class="left_txt3">网站名称，网址，网站备案号，联系方式，网站公告，关键词，风格</span><span
															class="left_txt2">等以及网站</span><span class="left_txt3">会员及等级积分设置</span><span
															class="left_txt2">。 </span>
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" height="31" border="0" cellpadding="0"
												cellspacing="0" class="nowtable">
												<tr>
													<td class="left_bt2">
														&nbsp;&nbsp;&nbsp;&nbsp;留言信息管理
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
										     <table width="100%" border="0" cellspacing="0"
												cellpadding="0" style="font-size: 12px;">
												 <tr><td align="right">
											    【 <pg:pager url="message!findAllMessageByLimit.action" items="${pm.total}"
											export="currentPageNumber=pageNumber" maxPageItems="5"
											maxIndexPages="5">
											<pg:first>
												<a href="${pageUrl}">首页</a>
											</pg:first>  
                                             [第${currentPageNumber}页]/[共${pm.total}条记录]
                                            <pg:prev>
												<a href="${pageUrl }">上一页</a>
											</pg:prev>
											<pg:pages>
												<c:choose>
													<c:when test="${currentPageNumber eq pageNumber}">
														<font color="red">${pageNumber }</font>
													</c:when>
													<c:otherwise>
														<a href="${pageUrl }">${pageNumber }</a>
													</c:otherwise>
												</c:choose>
											</pg:pages>
											<pg:next>
												<a href="${pageUrl }">下一页</a>
											</pg:next>
											<pg:last>
												<a href="${pageUrl }">尾页</a>
											</pg:last>
										</pg:pager> 】
										   </td></tr>		
											</table><hr>
                                             <c:if test="${!empty pm.datas}"> 
												<c:forEach items="${pm.datas}" var="message">
                                                 <table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												   <tr bgcolor="#ECEAE9">
												     <td width="10%">编号:<font color="green">${message.mid }</font><br></td>
												     <td width="20%">姓名:<font color="green">${message.pname }</font><br></td>
												     <td width="20%">电话:<font color="red">${message.telphone }</font><br></td>
												     <td>Email:<font color="red">${message.email }</font><br></td>
												     <td>留言时间:<font color="red"><fmt:formatDate value="${message.matime}" pattern="yyyy-MM-dd HH:mm"/></font><br></td>
												   </tr>
												   <tr height="50px">
												     <td colspan="5" style="font-size: 16px;">
												      留言内容:<font color="blue">${message.mcontent }</font>
												      <br></td>
												   </tr>
												   <tr height="110"  bgcolor="#ECEAE9">
												     <td colspan="3" rowspan="3">
												     <form action="message!updateMessage.action" method="post">
												      <input type="hidden" name="message.mid" value="${message.mid }">
												      <input type="hidden" name="message.remark1" value="1">   
					                                  <textarea rows="5" cols="40" name="message.recontent">
					                                   ${message.recontent }
					                                  </textarea>
												      <input type="submit" value="回复"/>
												     </form>
												     </td>
												     <td align="center">
												      <form action="message!updateMessage.action" method="post">
												      <c:if test="${'是' eq message.ischeck }">
												         <input type="hidden" name="message.ischeck" value="否">
												         <input type="hidden" name="message.remark1" value="2">
												         <input type="hidden" name="message.mid" value="${message.mid }">
												         <font color="green" size="2px">已审核</font>
												         <input type="submit" value="取消审核"/>
												      </c:if>
												      <c:if test="${'否' eq message.ischeck }">
												          <input type="hidden" name="message.ischeck" value="是">
												          <input type="hidden" name="message.remark1" value="3">
												          <input type="hidden" name="message.mid" value="${message.mid }">
												          <font color="red" size="2px">未审核</font>
												         <input type="submit" value="留言审核"/>
												      </c:if>
												      </form>
												    </td>
												     <td align="center"><a href="message!delMessageByMid.action?message.mid=${message.mid }">信息删除</a></td>
												   </tr>
												 </table>
												  <hr>
												</c:forEach>
											</c:if>
											<c:if test="${empty pm.datas}">
												<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												  <tr>
												   <td align="center" style="color: red">【没有找到相关的留言信息记录】</td>
												  </tr>
												</table>
											</c:if>
											 <table width="100%" border="0" cellspacing="0"
												cellpadding="0" style="font-size: 12px;">
												 <tr><td align="right">
											    【 <pg:pager url="message!findAllMessageByLimit.action" items="${pm.total}"
											export="currentPageNumber=pageNumber" maxPageItems="5"
											maxIndexPages="5">
											<pg:first>
												<a href="${pageUrl}">首页</a>
											</pg:first>  
                                             [第${currentPageNumber}页]/[共${pm.total}条记录]
                                            <pg:prev>
												<a href="${pageUrl }">上一页</a>
											</pg:prev>
											<pg:pages>
												<c:choose>
													<c:when test="${currentPageNumber eq pageNumber}">
														<font color="red">${pageNumber }</font>
													</c:when>
													<c:otherwise>
														<a href="${pageUrl }">${pageNumber }</a>
													</c:otherwise>
												</c:choose>
											</pg:pages>
											<pg:next>
												<a href="${pageUrl }">下一页</a>
											</pg:next>
											<pg:last>
												<a href="${pageUrl }">尾页</a>
											</pg:last>
										</pg:pager> 】
										   </td></tr>		
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
				<td background="<%=basePath %>admin/images/mail_rightbg.gif">&nbsp;
					
				</td>
			</tr>
			<tr>
				<td valign="middle" background="<%=basePath %>admin/images/mail_leftbg.gif">
					<img src="<%=basePath %>admin/images/buttom_left2.gif" width="17" height="17" />
				</td>
				<td height="17" valign="top"
					background="<%=basePath %>admin/images/buttom_bgs.gif">
					<img src="<%=basePath %>admin/images/buttom_bgs.gif" width="17" height="17" />
				</td>
				<td background="<%=basePath %>admin/images/mail_rightbg.gif">
					<img src="<%=basePath %>admin/images/buttom_right2.gif" width="16" height="17" />
				</td>
			</tr>
		</table>
</body>
